Skip to content

fix: wire up timer lifecycle in add/update/remove handlers - #570

Closed
nhwilly wants to merge 1 commit into
TimeWarpEngineering:masterfrom
nhwilly:copilot/fix-initialize-timer-reset-issue
Closed

nhwilly wants to merge 1 commit into
TimeWarpEngineering:masterfrom
nhwilly:copilot/fix-initialize-timer-reset-issue

Conversation

@nhwilly

@nhwilly nhwilly commented Apr 4, 2026

Copy link
Copy Markdown

@StevenTCramer

Copy link
Copy Markdown
Collaborator

Thanks for this, @nhwilly — you spotted a real bug.

AddTimer / UpdateTimer still store a bare new Timer(duration) without Elapsed, AutoReset = false, or Start(). Only Initialize wires those. That is exactly kanban 064 (Fix timer actions never wiring created timers).

We are not merging this PR:

  • The same work is already tracked as 064 (still to-do; not landed on master yet).
  • The branch is based on the pre-080 handler shape (Task Handle vs ValueTask, older mediator types), so it would not apply cleanly on current master.

When we pick up 064 we will extract a shared create-and-start helper and use it from Initialize / AddTimer / UpdateTimer, and stop+dispose on replace/remove — the same approach you took here.

Closing in favor of 064. Appreciate you bringing it to our attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants